<!--质检-->
<div class="wrap">
	<table class="table">
		<thead>
			<tr>
				<th>订单编号</th>
				<th>订单状态</th>
				<th>下单时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="orderCont">
		</tbody>
	</table>
</div>
<script>
	$.ajax({
		type:"post",
		url:"http://39.108.164.20/device/SysUser/TestList",
		dataType:"json",
		success:function(res){
			console.log(res)
			var data  = res.result.data;
			var html = '';
			if(res.result.success != 0){
				html += '<tr><td colspan="4" style="text-align:center;">暂无数据!</td></tr>'
			}else{
				for(let i=0;i<data.length;i++){
					html += '<tr><td>'+data[i].order_id+'</td><td>'+data[i].status+'</td><td>'+data[i].create_time+'</td><td><a href="javascript:void(0)" onclick="detailFun($(this))">详情</a></td></tr>'
				}
			}
			$("#orderCont").append(html);
		}
	});
	//详情
	//跳转详情
	function detailFun(e){
		var id = e.parents("tr").attr("data-id");
		$.cookie("id",id); 
		$("#main").empty();
		$.ajax({
			type:"get",
			url:"quality_check_detail.html",
			success:function(res){
				$("#main").append(res);
			}
		});
	}
</script>